Skip to content

gigamon: add CEF/UDP input to ami data stream#18402

Open
sanjay-2307 wants to merge 1 commit into
elastic:mainfrom
sanjay-2307:gigamon/add-cef-udp-input
Open

gigamon: add CEF/UDP input to ami data stream#18402
sanjay-2307 wants to merge 1 commit into
elastic:mainfrom
sanjay-2307:gigamon/add-cef-udp-input

Conversation

@sanjay-2307

Copy link
Copy Markdown

WHAT:
Adds a UDP input for CEF log ingestion to the existing Gigamon AMI
data stream alongside the existing HTTP Endpoint (JSON) input.

  • Added UDP input in manifest.yml for CEF log collection
  • Added cef-pipeline.yml for GigamonMdata* field normalization before rejoining the main default pipeline

WHY:
Gigamon AMI supports two output formats - JSON over HTTP and CEF over
UDP. The existing package only supported JSON. This change adds CEF
support within the same data stream so both inputs share the same
index, ECS mappings, and dashboards.

@sanjay-2307 sanjay-2307 requested a review from a team as a code owner April 15, 2026 05:48
@cla-checker-service

cla-checker-service Bot commented Apr 15, 2026

Copy link
Copy Markdown

💚 CLA has been signed

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown

Reviewers

Buildkite won't run for external contributors automatically; you need to add a comment:

  • /test : will kick off a build in Buildkite.

NOTE: https://github.com/elastic/integrations/blob/main/.buildkite/pull-requests.json contains all those details.

@sanjay-2307 sanjay-2307 force-pushed the gigamon/add-cef-udp-input branch 2 times, most recently from 3c3e011 to df66721 Compare April 15, 2026 06:31
@kcreddy

kcreddy commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

/test

@kcreddy kcreddy added the Team:Integration-Experience Security Integrations Integration Experience [elastic/integration-experience] label Apr 15, 2026
@elasticmachine

Copy link
Copy Markdown

Pinging @elastic/integration-experience (Team:Integration-Experience)

@kcreddy kcreddy added Integration:gigamon Gigamon (Partner supported) enhancement New feature or request labels Apr 15, 2026
@sanjay-2307 sanjay-2307 force-pushed the gigamon/add-cef-udp-input branch from df66721 to 32d4883 Compare April 15, 2026 10:46
@sanjay-2307

Copy link
Copy Markdown
Author

@kcreddy could you please drop a comment to initiate the test ?

@kcreddy

kcreddy commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

/test

@sanjay-2307

Copy link
Copy Markdown
Author

@kcreddy we noticed a few fields that still need to be renamed or dropped. I’ll update those early next week, and then you can proceed with merging the PR.

@kcreddy kcreddy marked this pull request as draft April 20, 2026 04:24
@kcreddy

kcreddy commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

@kcreddy we noticed a few fields that still need to be renamed or dropped. I’ll update those early next week, and then you can proceed with merging the PR.

@sanjay-2307, I've moved this PR to draft til then. You can mark it Ready for review when your changes are made.

and then you can proceed with merging the PR.

GIgamon used to be owned by our team, but recently there was a change in ownership. Once the owned team approves the PR, then only it can be merged.

@sanjay-2307 sanjay-2307 force-pushed the gigamon/add-cef-udp-input branch from 32d4883 to 0d24106 Compare April 29, 2026 09:55
@sanjay-2307 sanjay-2307 force-pushed the gigamon/add-cef-udp-input branch from 0d24106 to 79a01d8 Compare April 29, 2026 11:32
@sanjay-2307

Copy link
Copy Markdown
Author

@kcreddy PR is now ready for review. Could you please trigger the Buildkite test with /test to kick off the CI pipeline?

@kcreddy

kcreddy commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

/test

@kcreddy kcreddy added the maintainer:Partner Partner supported integration label Apr 29, 2026
@kcreddy

kcreddy commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

@sanjay-2307 , there is an error in the CI:
Error: checking package failed: checking readme files are up-to-date failed: files do not match

You will need to run elastic-package build and commit the generated README.md file.

@sanjay-2307 sanjay-2307 force-pushed the gigamon/add-cef-udp-input branch from 79a01d8 to c78a3af Compare April 30, 2026 06:19
@sanjay-2307

Copy link
Copy Markdown
Author

@kcreddy I have added the latest README.md file.

@kcreddy

kcreddy commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

/test

@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

History

@kcreddy kcreddy marked this pull request as ready for review April 30, 2026 10:57
@kcreddy

kcreddy commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

@elastic/integration-experience PTAL at this PR. This integration recently changed ownership from Service Integrations team to IE.

@andrewkroh andrewkroh added the documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. label Apr 30, 2026
@sanjay-2307

Copy link
Copy Markdown
Author

@elastic/integration-experience / @andrewkroh Gentle follow-up on this PR, could you please share the current status when you have a moment?

@botelastic

botelastic Bot commented Jun 25, 2026

Copy link
Copy Markdown

Hi! We just realized that we haven't looked into this PR in a while. We're sorry! We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1. Thank you for your contribution!

@botelastic botelastic Bot added the Stalled label Jun 25, 2026
@vera-review-bot

Copy link
Copy Markdown

👀 I have started reviewing the PR

target_field: gigamon.ami
if: ctx.json != null
tag: rename_json
- pipeline:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 MEDIUM data_stream/ami/.../default.yml:12

New CEF/UDP processing path ships without pipeline tests

This PR adds a brand-new CEF processing branch here (- pipeline: guarded by if: ctx.cef != null) that calls the new 730-line cef-pipeline.yml. None of it is exercised by a test: the only pipeline fixture, _dev/test/pipeline/test-ami.json, contains JSON-input events only, so every rename in cef-pipeline.yml and the entire cef != null branch run untested. This is a newly introduced code path (not a pre-existing gap), so a regression in CEF field renaming, the cef.extensions -> gigamon.ami mapping, or the new TcpRtt* converts would not be caught.

Recommendation:

Add a CEF pipeline test fixture and expected output covering the cef != null branch, e.g. _dev/test/pipeline/test-cef.log with a matching test-cef.log-expected.json. Configure the CEF test in _dev/test/pipeline/test-common-config.yml so the decode happens correctly:

fields:
  tags:
    - preserve_original_event
dynamic_fields:
  "event.ingested": ".*"

The fixture should include at least one raw CEF message that populates gigamon.ami.* extension fields (src/dst IP, ports, the new TcpRtt* and app_tags fields) so the new pipeline and converts are validated.


🤖 AI-Generated Review | Vera Review Bot | 📚 Knowledge base: integration-skills

⚠️ Automated review — verify suggestions before applying.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to confirm the right approach, as I hit a constraint while implementing it.

The recommendation was to add a raw test-cef.log fixture and configure decoding in test-common-config.yml. However, in this package CEF decoding is done by the agent-side decode_cef processor (in udp.yml.hbs), and decode_cef is not available as an Elasticsearch ingest processor. When I tried adding decode_cef to the ingest pipeline (default.yml), Put Pipeline fails with:

No processor type exists with name [decode_cef]

Because pipeline tests only exercise the ingest pipeline (not agent processors), a raw test-cef.log never gets decoded during the test, so ctx.cef stays null and the cef != null branch isn’t actually exercised (the generated expected doc only contains the raw message and no gigamon.ami.* fields).

To genuinely cover the branch, I added a pre-decoded CEF fixture (test-cef.json) that mirrors the agent’s decode_cef output (populated cef.extensions), which correctly triggers the cef != null path and validates the cef.extensions → gigamon.ami renames, the new TcpRtt* converts, and app_tags. Both tests pass:

test-ami.json PASS
test-cef.json PASS

Could you please confirm this approach is acceptable, i.e. using a pre-decoded test-cef.json fixture instead of a raw test-cef.log, given that decode_cef can only run agent-side? If you’d prefer a different pattern for covering the CEF branch, happy to adjust.

Comment thread packages/gigamon/data_stream/ami/elasticsearch/ingest_pipeline/cef-pipeline.yml Outdated
Comment thread packages/gigamon/data_stream/ami/fields/fields.yml Outdated
@botelastic botelastic Bot removed the Stalled label Jul 3, 2026
@sanjay-2307 sanjay-2307 force-pushed the gigamon/add-cef-udp-input branch from c78a3af to 5c3e6ee Compare July 3, 2026 10:53
@sanjay-2307 sanjay-2307 force-pushed the gigamon/add-cef-udp-input branch from 5c3e6ee to 087d7ab Compare July 3, 2026 12:52
Comment thread packages/gigamon/data_stream/ami/fields/fields.yml Outdated
@sanjay-2307 sanjay-2307 force-pushed the gigamon/add-cef-udp-input branch from 087d7ab to 4b389d5 Compare July 3, 2026 16:14
Comment thread packages/gigamon/data_stream/ami/_dev/test/pipeline/test-cef.json-expected.json Outdated
Comment thread packages/gigamon/docs/README.md Outdated
@sanjay-2307 sanjay-2307 force-pushed the gigamon/add-cef-udp-input branch 2 times, most recently from 630ac1d to 05bbead Compare July 4, 2026 13:37
Comment thread packages/gigamon/data_stream/ami/elasticsearch/ingest_pipeline/default.yml Outdated
@sanjay-2307 sanjay-2307 force-pushed the gigamon/add-cef-udp-input branch from 05bbead to 591860c Compare July 4, 2026 14:32
Comment thread packages/gigamon/data_stream/ami/manifest.yml Outdated
Comment thread packages/gigamon/data_stream/ami/fields/fields.yml Outdated
Comment thread packages/gigamon/docs/README.md
@sanjay-2307 sanjay-2307 force-pushed the gigamon/add-cef-udp-input branch from 591860c to bfb883f Compare July 6, 2026 09:18
@vera-review-bot

Copy link
Copy Markdown

No issues across the latest commits bfb883f.

Review summary

Issues found across earlier commits 591860c — 1 medium, 2 low
  • 🟡 The new UDP stream declares a preserve_duplicate_custom_fields variable, but udp.yml.hbs never renders it into tags, so the toggle is inert — enabling it has no effect. Drop the variable, or wire it into the emitted tags so the pipeline's tags.contains('preserve_duplicate_custom_fields') guard can see it. (link) (Resolved)
  • 🔵 The new app_tags field definition has trailing whitespace after type: keyword, which elastic-package format will normalise. Strip the trailing spaces to keep the file clean and avoid a format-check delta. (link) (Resolved)
  • 🔵 The updated README.md ends without a trailing newline on the final tags table row. Restore the trailing newline so the file matches standard generated docs formatting. (link) (Resolved)
Issues found across earlier commits 05bbead — 1 low
  • 🔵 The new cef-pipeline dispatch processor uses tag: cef pipeline, which contains a space and breaks the snake_case convention every other tag in default.yml follows (link) (Resolved)
Issues found across earlier commits 4b389d5 — 2 high
  • 🟠 The expected fixture asserts PascalCase gigamon.ami.TcpRtt* keys, but the renamed cef-pipeline now emits snake_case tcp_rtt_* keys, so the pipeline test will fail (link) (Resolved)
  • 🟠 The README field table lists PascalCase gigamon.ami.TcpRtt* fields that no longer exist after the snake_case rename, so it is out of date and the readme-up-to-date check will fail (link) (Resolved)
Issues found across earlier commits 087d7ab — 1 medium, 1 low
  • 🟡 The new TcpRtt* fields use PascalCase, breaking the snake_case naming convention every other gigamon.ami field follows (link) (Resolved)
  • 🔵 The rename/remove processors in the new cef-pipeline.yml have no tag fields, so on_failure error.message cannot identify which processor failed (link) (Resolved)
Issues found across earlier commits 2a55beb5c3e6ee (250 commits) — 1 low
  • 🔵 The new cef-pipeline.yml on_failure omits set event.kind: pipeline_error (link) (Resolved)

Since this is a community PR, a new commit triggers another review — at most once every 30 minutes. I skip the PR while it's approved or has merge conflicts.

🤖 AI-Generated Review | Vera Review Bot | 📚 Knowledge base: integration-skills

⚠️ Automated review — verify suggestions before applying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. enhancement New feature or request Integration:gigamon Gigamon (Partner supported) maintainer:Partner Partner supported integration Team:Integration-Experience Security Integrations Integration Experience [elastic/integration-experience]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants